package pack.jcus_notifier;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;

public class UserPage extends Activity 
{
	
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.userpage);

        GridView gridview = (GridView) findViewById(R.id.gridview);
        gridview.setAdapter(new ImageAdapter(this));

        gridview.setOnItemClickListener(new OnItemClickListener() 
        {
            public void onItemClick(AdapterView<?> parent, View v, int position, long id) 
            {
            	Intent fullScreenIntent = new Intent(UserPage.this, FullScreen.class);
            	
            	fullScreenIntent.putExtra ("pack.jcus_notifier.theimageselected", mThumbIds[position]);
                
            	UserPage.this.startActivity(fullScreenIntent);
            	               
            }
        });
    }
    
 
    public Integer[] mThumbIds = {
    		R.drawable.attendance, R.drawable.clubs,
            R.drawable.contacts, R.drawable.images,
            R.drawable.library, R.drawable.notice_board,
            R.drawable.reservation, R.drawable.timetable
    };
    
}